home *** CD-ROM | disk | FTP | other *** search
- ps.1.1
-
- def c0, 0.3, 0.3, 0.3, 0.0 ;ambient light color
- def c1, 1.0, 1.0, 1.0, 0.0 ;light color
-
- tex t0 ;Sample base map
- tex t1 ;Sample normal map
- tex t2 ;Sample gloss map
-
- dp3_sat r1, t1_bx2, v1_bx2 ;half vector dot normal
-
- ;exp specular
- mul r1, r1, r1 // 2
- mul r1, r1, r1 // 4
- mul r1, r1, r1 // 8
- ;mul r1, r1, r1 // 32
-
- mul_sat r1, r1, t2
-
- dp3_sat r0, t1_bx2, v0_bx2 ;N dot L for Light1 - normal shading
- mad_sat r0, r0, c1, c0 ;Color for Light1 C3 = dircolor + C2 = ambcolor
-
- mad_sat r0.rgb, r0, t0, r1